



//config_file.cfg
{
  "file_format": 1; //1 to Binray, 2 to Text
}

int main(){
  Config config(configFileName); 

  BreakPointService service(.., config.FileFormat());

  service.start();
  service.stop();

  return 0;
}

BreakPointService::BreakPointService(..., int type){
  _file = BreakPointFactory()::instance()->create(type);
}



IBreakPointFile * BreakPointFactory::create(..., int type){
  switch(type){
    case BINARY_MODE : //1
      return new BreakPointFileAsBinary(...);
    case TEXT_MODE :  //2
      return new BreakPointFileAsText(...);
    default:
      return new BreakPointFileAsBinary(...);
  }
}

